import { formatDate } from '@const/filter.js'

// 证照历史数据
export const historyColumns = [
  { type: 'index', label: '序号', width: 55 },
  { width: 130, prop: 'updatedAt', label: '更新时间', formatter: row => (formatDate(row.updatedAt, 'YYYY-MM-DD HH:mm:ss')) },
  { width: 130, prop: 'startDate', label: '有效期从', formatter: row => (formatDate((row.startDate || row.recordDate), 'YYYY-MM-DD')) },
  { width: 130, prop: 'endDate', label: '截止日期', formatter: row => (formatDate(row.endDate, 'YYYY-MM-DD')) },
  { width: 90, prop: 'effectiveness', label: '长期有效', formatter: row => (row.effectiveness === 1 ? '是' : '否') },
  { width: 130, prop: 'licenceCode', label: '证照编号' },
  { 'min-width': 150, prop: 'licenceName', label: '证照名称' },
  { 'min-width': 150, prop: 'url', label: '图片' }
]